<?php

class Admin_Form_ValidateComment extends Zendvn_Validate_Form{
		
		public function __construct($arrParam = null, $options = null){
		
		$config = new Zendvn_Controller_Config(array('module'=>$arrParam['module'],'fileConfig'=>'validates/comment.ini'));
		//==========================Validate content============================
		$name  = $config->getConfig('content');
		$validator  =  $this->validate($name,$arrParam);
		if(!$validator->isValid($arrParam['content'])){
			$message = $validator->getMessages();
			$this->_arrError['content'] = current($message);
		}
		
		$this->_arrData = $arrParam;
	}
	
	public function getData(){
		return $this->_arrData;
	}
	public function isVaild(){
		$flag = false;
		if(count($this->_arrError) > 0 && $this->_arrError != ''){
			$flag = true;
		}
		return $flag;
	}
	
	public function getMessageErrors(){
		return $this->_arrError;
	}
	
}







